//
#include<stdio.h>
int main()
{
	int i = 0, tem = 0, j = 0, k = 0;
	int arr[] = { 1,4,3,8,7,6,5,9,2 };
	int z = sizeof(arr) / sizeof(arr[0]);
	for (i = 1; i <= z - 1; i++)
	{
		k = arr[i];
		j = i - 1;
		while (j >= 0 && arr[j] > k)
		{
			arr[j + 1] = arr[j];
			j--;
		}
		arr[j + 1] = k;
	}
	for (i = 0; i < 9; i++)
	{
		printf("%d ", arr[i]);
	}
	return 0;
}